package com.doudou.collection.orm.dto.user.reg;

import com.doudou.collection.utils.regex.RegexPatterns;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @ClassName EmailCodeRegDTO<br>
 * @Description TODO<br>
 * @Author 李浩文<br>
 * @Date 2023/6/15 20:44<br>
 * @Version 1.0<br>
 */
@Data
public class EmailCodeRegDTO {
    @NotNull
    @Pattern(regexp = RegexPatterns.EMAIL_REGEX, message = "邮箱格式错误！")
    @ApiModelProperty(value = "邮箱", required = true)
    private String email;

    @NotNull
    @Pattern(regexp = RegexPatterns.VERIFY_CODE_REGEX, message = "验证码格式错误")
    @ApiModelProperty(value = "验证码")
    private String code;
}
